package com.spider.admin.store.primary.model;



import com.spider.admin.conf.validator.UniqueValue;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.springframework.validation.annotation.Validated;

@Getter
@Setter

@Validated
@Entity
@Table(name = "t_cloud_info")

@Accessors(chain = true)

@Data
@EqualsAndHashCode(callSuper = true)
public class CloudInfo extends SuperVO{
    @Id
    @Column(name = "pid")
    private String pid;
    @NotEmpty(message = "服务云基础访问地址不能为空",groups = Save.class)
    @UniqueValue(domainClass = CloudInfo.class, fieldName = "cloudBasePath", message = "服务云基础访问地址不能重复", groups = {Save.class})
    @Column(name = "cloud_base_path")
    private String cloudBasePath;
    @NotEmpty(message = "服务云名称不能为空",groups = Save.class)
    @UniqueValue(domainClass = CloudInfo.class, fieldName = "cloudName", message = "服务云名称不能重复", groups = {Save.class})
    @Column(name = "cloud_name")
//    @Pattern(regexp = RegexpConst.a,message = "")//正在表达式数据验证
    private String cloudName;
    @Column(name = "cloud_desc")
    private String cloudDesc;
    @Column(name = "tenant_id")
    private String tenantId;
    @Column(name = "archive_status")
    private String archiveStatus;

}
